package com.dmx.cep.service;

import java.util.Date;
import java.util.List;

import com.dmx.cep.entity.Channel;
import com.dmx.cep.entity.ChannelType;
import com.dmx.cep.entity.ConfAttributeSelection;
import com.dmx.cep.entity.TvContentInfo;
import com.dmx.cep.entity.TvContentStatus;
import com.dmx.cep.entity.TvContentType;
import com.dmx.fw.service.interfaces.Service;

public interface EpgService extends Service{
	
	List<ChannelType> getChannelTypeList();
	
	List<Channel> getChannelList();
	
	List<TvContentType> getContentTypeList() throws Exception;
	
	boolean isChannelIdExists(Long channelId) throws Exception;
	
	boolean isChannelCodeExists(String code) throws Exception;
	
	boolean isChannelNameExists(String name) throws Exception;
	
	boolean isChannelExists(String channelCode) throws Exception;
	
	TvContentType getContentTypeByName(String typeName) throws Exception;
	
	void removeEPGPrograms(String channelCode,Date epgStartTime) throws Exception;
	
	Date getLastProgramEndTime(String channelCode) throws Exception;
	
	void batchOverWritePrograms(String channelCode,Date epgStartTime,List<TvContentInfo> tvContentList,List<TvContentStatus> tvContentStatusList)  throws Exception;
	
	Integer deleteExpiredEpgData(final Date validDate,final int maxResults) throws Exception;
	
	ConfAttributeSelection getConfAttributeByKey(String key) throws Exception;
	
	List<TvContentInfo> getTvContentListByChannelCode(String channelCode) throws Exception;
}
